package xfsale.web.service.impl;

import xfsale.packet.CustomerRequest;
import xfsale.packet.CustomerResponse;
import xfsale.packet.SysDictRequest;
import xfsale.packet.SysDictResponse;
import xfsale.packet.SysMenuRequest;
import xfsale.packet.SysMenuResponse;
import xfsale.packet.SysParamRequest;
import xfsale.packet.SysParamResponse;
import xfsale.service.impl.j2ee.Customer;
import xfsale.service.impl.j2ee.SysDict;
import xfsale.service.impl.j2ee.SysMenu;
import xfsale.service.impl.j2ee.SysParam;
import xfsale.web.service.InfoService;

@SuppressWarnings("CallToThreadDumpStack")
public final class InfoServiceImpl implements InfoService {

    @Override
    public SysMenuResponse getSystemMenu(SysMenuRequest request) {
        SysMenuResponse response = new SysMenuResponse();

        try {
            SysMenu service = new SysMenu(request, response);
            service.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return response;
    }

    @Override
    public SysDictResponse getSystemDict(SysDictRequest request) {
        SysDictResponse response = new SysDictResponse();

        try {
            SysDict service = new SysDict(request, response);
            service.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return response;
    }

    @Override
    public SysParamResponse getSystemParam(SysParamRequest request) {
        SysParamResponse response = new SysParamResponse();

        try {
            SysParam service = new SysParam(request, response);
            service.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return response;
    }

    @Override
    public CustomerResponse getCustomer(CustomerRequest request) {
        CustomerResponse response = new CustomerResponse();

        try {
            Customer service = new Customer(request, response);
            service.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return response;
    }
}
